]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Pass a full pathname to AnimatedIcon
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Apr 2013 14:57:09 +0000 (16:57 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Apr 2013 17:10:40 +0000 (19:10 +0200)
For classic mode, we want to use a different styling for the spinner,
so we will pick up the image filename from CSS to make use of mode
specific styling. As the CSS will give us a full pathname, adapt the
API to take a full pathname instead of building it inside AnimatedIcon
from the passed basename.

https://bugzilla.gnome.org/show_bug.cgi?id=693688

js/gdm/loginDialog.js
js/ui/panel.js
js/ui/unlockDialog.js

index 77bd2eb0e258bd61f41a2f7d615fbc881528bf1b..c023f4c8edba6a0fea379fe4e7c98aa18bcb3f29 100644 (file)
@@ -774,7 +774,8 @@ const LoginDialog = new Lang.Class({
     },
 
     _prepareDialog: function(forSecret, hold) {
-        this._workSpinner = new Panel.AnimatedIcon('process-working.svg', WORK_SPINNER_ICON_SIZE);
+        let spinnerIcon = global.datadir + '/theme/process-working.svg';
+        this._workSpinner = new Panel.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
         this._workSpinner.actor.opacity = 0;
         this._workSpinner.actor.show();
 
index c16e318cd416bec66596b01b9bd17f279398b0c6..49f17693995203b3eec0611e5173746ffa696389 100644 (file)
@@ -144,8 +144,8 @@ const AnimatedIcon = new Lang.Class({
     Name: 'AnimatedIcon',
     Extends: Animation,
 
-    _init: function(name, size) {
-        this.parent(global.datadir + '/theme/' + name, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
+    _init: function(filename, size) {
+        this.parent(filename, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
     }
 });
 
@@ -297,8 +297,8 @@ const AppMenuButton = new Lang.Class({
 
         this._stop = true;
 
-        this._spinner = new AnimatedIcon('process-working.svg',
-                                         PANEL_ICON_SIZE);
+        let spinnerIcon = global.datadir + '/theme/process-working.svg';
+        this._spinner = new AnimatedIcon(spinnerIcon, PANEL_ICON_SIZE);
         this._container.add_actor(this._spinner.actor);
         this._spinner.actor.hide();
         this._spinner.actor.lower_bottom();
index 727df6175cec00422d26385372aee8273b1acc9e..6c8bc6e029d18fb53f2b4af3bd1b061bb0c6bf1e 100644 (file)
@@ -91,7 +91,8 @@ const UnlockDialog = new Lang.Class({
         this._promptLoginHint.hide();
         this.contentLayout.add_actor(this._promptLoginHint);
 
-        this._workSpinner = new Panel.AnimatedIcon('process-working.svg', LoginDialog.WORK_SPINNER_ICON_SIZE);
+        let spinnerIcon = global.datadir + '/theme/process-working.svg';
+        this._workSpinner = new Panel.AnimatedIcon(spinnerIcon, LoginDialog.WORK_SPINNER_ICON_SIZE);
         this._workSpinner.actor.opacity = 0;
 
         this.allowCancel = false;